chore: change respect e2e to use cafe api - #2986
Conversation
|
Performance Benchmark (Lower is Faster)
|
8d3bbd5 to
3519a3d
Compare
looks like false-alarm |
There was a problem hiding this comment.
Pull request overview
This PR updates the Respect end-to-end fixture suite to target the Redocly Cafe API (api.cafe.redocly.com) instead of the Museum API mock, and refreshes the Cafe OpenAPI resource examples/docs to match current behavior (notably pagination and list query parameters).
Changes:
- Repointed Respect e2e Arazzo workflows and Vitest snapshots from Museum API fixtures to Cafe API fixtures (menu, orders, OAuth2 registration, etc.).
- Added new Cafe-focused Arazzo fixtures (e.g., menu search workflow and a new “outputs in path parameters” scenario) and removed the old Museum tickets fixture.
- Updated
resources/cafe.yamlandresources/cafe-split/to refine per-endpoint filter/sort/search guidance and align revenue date fields todate-time.
Reviewed changes
Copilot reviewed 81 out of 81 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/respect/x-security-scheme-apply-order/x-security-scheme-apply-order.arazzo.yaml | Switch x-security apply-order fixture to Cafe menu list operation and params. |
| tests/e2e/respect/x-security-scheme-apply-order/snapshots/x-security-scheme-apply-order.test.ts.snap | Update snapshot output for Cafe API request/response shape and status checks. |
| tests/e2e/respect/x-security-resolve-scheme-name/x-security-resolve-scheme-name.arazzo.yaml | Update scheme-name resolution fixture to Cafe OAuth2 / API key scenarios. |
| tests/e2e/respect/x-security-resolve-scheme-name/snapshots/x-security-resolve-scheme-name.test.ts.snap | Update snapshot for Cafe auth header expectations and list responses. |
| tests/e2e/respect/x-security-open-id-connect-auth/x-security-open-id-connect-auth.arazzo.yaml | Repoint OpenID Connect fixture to Cafe menu listing with query params. |
| tests/e2e/respect/x-security-open-id-connect-auth/snapshots/x-security-open-id-connect-auth.test.ts.snap | Update snapshot to Cafe list response and status expectations. |
| tests/e2e/respect/x-security-on-workflow-level-merged-to-steps/x-security-on-workflow-level-merged-to-steps.arazzo.yaml | Update workflow-level x-security merge fixture to Cafe menu/orders operations. |
| tests/e2e/respect/x-security-on-workflow-level-merged-to-steps/snapshots/x-security-on-workflow-level-merged-to-steps.test.ts.snap | Update snapshot for Cafe endpoints and expected status codes. |
| tests/e2e/respect/x-security-oauth2-auth/x-security-oauth2-auth.arazzo.yaml | Update OAuth2 auth fixture to Cafe menu list request. |
| tests/e2e/respect/x-security-oauth2-auth/snapshots/x-security-oauth2-auth.test.ts.snap | Update snapshot for Cafe menu list response and checks. |
| tests/e2e/respect/x-security-bearer-auth/x-security-bearer-auth.arazzo.yaml | Update bearer auth fixture to Cafe menu list request. |
| tests/e2e/respect/x-security-bearer-auth/snapshots/x-security-bearer-auth.test.ts.snap | Update snapshot for Cafe list output. |
| tests/e2e/respect/x-security-basic-auth/x-security-basic-auth.arazzo.yaml | Update basic auth fixture to Cafe menu list request. |
| tests/e2e/respect/x-security-basic-auth/snapshots/x-security-basic-auth.test.ts.snap | Update snapshot for Cafe list output. |
| tests/e2e/respect/x-security-api-key-auth/x-security-api-key-auth.arazzo.yaml | Update API key fixture to Cafe menu list request and query param. |
| tests/e2e/respect/x-security-api-key-auth/snapshots/x-security-api-key-auth.test.ts.snap | Update snapshot for Cafe list output and status checks. |
| tests/e2e/respect/x-allow-reserved-query-param/x-allow-reserved-query-param.arazzo.yaml | Switch allowReserved test to Cafe menu filter/search and add explicit 400 success criteria. |
| tests/e2e/respect/x-allow-reserved-query-param/snapshots/x-allow-reserved-query-param.test.ts.snap | Update snapshot for Cafe error response and additional check count. |
| tests/e2e/respect/workflow-success-actions/workflow-success-actions.arazzo.yaml | Rework successActions fixture to operate on Cafe menu + OAuth2 registration flows. |
| tests/e2e/respect/workflow-success-actions/snapshots/workflow-success-actions.test.ts.snap | Update snapshot for Cafe workflows and child workflow behavior. |
| tests/e2e/respect/workflow-failure-actions/workflow-failure-actions.arazzo.yaml | Rework failureActions fixture to use Cafe menu list workflow and retry/goto behavior. |
| tests/e2e/respect/workflow-failure-actions/snapshots/workflow-failure-actions.test.ts.snap | Update snapshot for Cafe failure action execution and retry output. |
| tests/e2e/respect/workflow-depends-on-not-found/workflow-depends-on-not-found.arazzo.yaml | Point depends-on fixture to the local Cafe OpenAPI fixture file. |
| tests/e2e/respect/workflow-depends-on-failed/workflow-depends-on-failed.arazzo.yaml | Point depends-on-failed fixture to the local Cafe OpenAPI fixture file. |
| tests/e2e/respect/step-on-success-type-end-action/step-on-success-type-end-action.arazzo.yaml | Update onSuccess end-action fixture to Cafe menu and OAuth2 registration paths. |
| tests/e2e/respect/step-on-success-type-end-action/snapshots/step-on-success-type-end-action.test.ts.snap | Update snapshot for Cafe endpoints and checks. |
| tests/e2e/respect/step-on-failure-type-end-action/step-on-failure-type-end-action.arazzo.yaml | Update onFailure end-action fixture to Cafe menu and OAuth2 registration paths. |
| tests/e2e/respect/step-on-failure-type-end-action/snapshots/step-on-failure-type-end-action.test.ts.snap | Update snapshot for Cafe endpoints and failure output. |
| tests/e2e/respect/severity-warn-level/severity-level.arazzo.yaml | Rework warn-severity fixture to Cafe API and deliberately wrong response definitions. |
| tests/e2e/respect/severity-warn-level/snapshots/severity-warn-level.test.ts.snap | Update snapshot for Cafe endpoints and warning expectations. |
| tests/e2e/respect/severity-off-level/severity-level.arazzo.yaml | Rework off-severity fixture to Cafe API and deliberately wrong response definitions. |
| tests/e2e/respect/severity-off-level/snapshots/severity-off-level.test.ts.snap | Update snapshot for Cafe endpoints and skipped-check expectations. |
| tests/e2e/respect/severity-error-level/severity-level.arazzo.yaml | Rework error-severity fixture to Cafe API and deliberately wrong response definitions. |
| tests/e2e/respect/severity-error-level/snapshots/severity-error-level.test.ts.snap | Update snapshot for Cafe endpoints and failing-check expectations. |
| tests/e2e/respect/server-override-with-console-parameters/server-override-with-console-parameters.test.ts | Update server override e2e test to Cafe sources and endpoints. |
| tests/e2e/respect/server-override-with-console-parameters/server-override-with-console-parameters.arazzo.yaml | Update server override fixture to Cafe workflows and child workflow. |
| tests/e2e/respect/server-override-with-console-parameters/snapshots/server-override-with-console-parameters.test.ts.snap | Update snapshot for Cafe override behavior and error output. |
| tests/e2e/respect/reveal-masked-input-secrets/reveal-masked-input-secrets.arazzo.yaml | Update secret reveal fixture to Cafe menu list + OAuth2 registration flow. |
| tests/e2e/respect/reveal-masked-input-secrets/snapshots/reveal-masked-input-secrets.test.ts.snap | Update snapshot for Cafe requests/responses and masking output. |
| tests/e2e/respect/reusable-components/reusable-components.arazzo.yaml | Update reusable component fixture to Cafe operations and outputs wiring. |
| tests/e2e/respect/replacements/replacements.arazzo.yaml | Update requestBody replacement fixtures to Cafe menu + OAuth2 + orders endpoints. |
| tests/e2e/respect/replacements/snapshots/replacements.test.ts.snap | Update snapshot for Cafe replacement scenarios and response bodies. |
| tests/e2e/respect/outputs-in-path-parameters/outputs-in-path-parameters.test.ts | Add new e2e test for resolving step outputs in path parameters (Cafe). |
| tests/e2e/respect/outputs-in-path-parameters/outputs-in-path-parameters.arazzo.yaml | Add new Arazzo fixture chaining query output into a path parameter. |
| tests/e2e/respect/outputs-in-path-parameters/snapshots/outputs-in-path-parameters.test.ts.snap | Add snapshot validating verbose URL rendering with resolved path params. |
| tests/e2e/respect/outputs-access-syntax-variations/outputs-access-syntax-variations.arazzo.yaml | Update outputs-access syntax coverage to Cafe list responses and OAuth2 error payloads. |
| tests/e2e/respect/museum-tickets.yaml | Remove Museum ticket-purchase workflow fixture. |
| tests/e2e/respect/mask-input-secrets/mask-input-secrets.arazzo.yaml | Update secret masking fixture to Cafe operations and OAuth2 error case. |
| tests/e2e/respect/mask-input-secrets/snapshots/mask-input-secrets.test.ts.snap | Update snapshot for Cafe masking behavior and responses. |
| tests/e2e/respect/inputs-with-cli-and-env/inputs-with-cli-and-env.arazzo.yaml | Update CLI/env inputs fixture to Cafe menu list + child workflow + OAuth2 error flow. |
| tests/e2e/respect/inputs-with-cli-and-env/snapshots/inputs-with-cli-and-env.test.ts.snap | Update snapshot for Cafe requests and outputs. |
| tests/e2e/respect/inputs-passed-to-step-target-workflow/inputs-passed-to-step-target-workflow.arazzo.yaml | Update child workflow invocation fixture to Cafe client registration workflow. |
| tests/e2e/respect/inputs-passed-to-step-target-workflow/events.arazzo.yaml | Update referenced Arazzo workflow to Cafe OAuth2 registration endpoint. |
| tests/e2e/respect/inputs-passed-to-step-target-workflow/snapshots/inputs-passed-to-step-target-workflow.test.ts.snap | Update snapshot for Cafe child workflow execution and validation errors. |
| tests/e2e/respect/inputs-passed-to-step-target-workflow-and-remapped/inputs-passed-to-step-target-workflow-and-remapped.arazzo.yaml | Update remapped-inputs fixture to Cafe child workflow. |
| tests/e2e/respect/inputs-passed-to-step-target-workflow-and-remapped/events.arazzo.yaml | Update referenced workflow for remapped-inputs scenario (Cafe). |
| tests/e2e/respect/inputs-passed-to-step-target-workflow-and-remapped/snapshots/inputs-passed-to-step-target-workflow-and-remapped.test.ts.snap | Update snapshot to reflect Cafe behavior and passing scenario. |
| tests/e2e/respect/consider-severity-in-next-step-execution/consider-severity-in-next-step-execution.arazzo.yaml | Update severity-next-step behavior fixture to Cafe menu list operations. |
| tests/e2e/respect/consider-severity-in-next-step-execution/snapshots/consider-severity-in-next-step-execution.test.ts.snap | Update snapshot for Cafe responses and warning behavior. |
| tests/e2e/respect/case-insensitive-headers/case-insensitive-headers.arazzo.yaml | Update header case-insensitivity fixture to Cafe API and expected response headers. |
| tests/e2e/respect/case-insensitive-headers/snapshots/case-insensitive-headers.test.ts.snap | Update snapshot for Cafe header checks. |
| tests/e2e/respect/cafe-menu.arazzo.yaml | Add reusable Cafe menu search workflow fixture to replace Museum tickets workflow usage. |
| resources/cafe.yaml | Update Cafe OpenAPI documentation: list parameter semantics, pagination wording, revenue date-time, and copy tweaks. |
| resources/cafe-split/paths/revenue.yaml | Align revenue query parameter formats/examples to date-time. |
| resources/cafe-split/paths/orders.yaml | Add per-endpoint filter/sort/search guidance and update order copy text. |
| resources/cafe-split/paths/orders_{orderId}.yaml | Update order status/update/delete copy text for consistency. |
| resources/cafe-split/paths/order-items.yaml | Clarify required filter semantics for selecting orderId. |
| resources/cafe-split/paths/menu.yaml | Add per-endpoint sort/filter/search guidance and examples for menu listing. |
| resources/cafe-split/components/schemas/RevenueStatistics.yaml | Change revenue period fields to date-time. |
| resources/cafe-split/components/schemas/MenuBaseItem.yaml | Minor wording tweak in photo field description. |
| resources/cafe-split/components/schemas/Error.yaml | Minor wording tweak in error schema field description. |
| resources/cafe-split/components/parameters/Search.yaml | Make search parameter description endpoint-generic and defer field lists to endpoints. |
| resources/cafe-split/components/parameters/Limit.yaml | Clarify limit parameter description wording. |
| resources/cafe-split/components/parameters/Filter.yaml | Make filter parameter description endpoint-generic and simplify operator bullets. |
| resources/cafe-split/components/parameters/Before.yaml | Fix pagination wording: before returns the previous page. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 81 out of 81 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (5)
resources/cafe-split/paths/menu.yaml:14
- This parameter item combines
$refwith sibling fields (description,example). In OpenAPI/JSON Reference, siblings to$refare not allowed and may be ignored, so the endpoint-specific docs might not apply.
Consider inlining the full Parameter object here, or creating endpoint-specific parameter components to reference instead of overriding a $ref.
- $ref: ../components/parameters/Sort.yaml
description: |-
Sorts the collection by a single field. Prefix with `-` for descending order
(for example, `-price`); omit the prefix for ascending order (`price`).
resources/cafe-split/paths/order-items.yaml:20
- This parameter item uses
$reftogether with sibling fields (required,description,example).$refobjects cannot have siblings, so these fields may be ignored and the spec can become invalid.
Inline the filter Parameter object here (with the orderId-only description), or create a dedicated parameter component for this endpoint and reference that.
- $ref: ../components/parameters/Filter.yaml
required: true
description: |-
Selects the order whose items to return, using a single `orderId:<value>` pair
(for example, `orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7`).
This filter is required and only the `orderId` field is supported.
example: orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7
resources/cafe.yaml:45
- OpenAPI
$refobjects must not have sibling fields (likedescription/example). With the current structure, these per-endpoint docs are invalid and may be ignored by tooling/resolvers.
To keep endpoint-specific docs, replace these $ref entries with full inline Parameter objects, or create endpoint-specific components/parameters/* variants (e.g. MenuSort, OrdersFilter) and reference those instead.
- $ref: '#/components/parameters/Sort'
description: >-
Sorts the collection by a single field. Prefix with `-` for
tests/e2e/respect/server-override-with-console-parameters/server-override-with-console-parameters.test.ts:11
- The
menu-from-cafe-api=...override looks misleading here: server overrides are applied by the OpenAPI source description name used to resolve the operation (e.g.cafe-api), and the child workflow’s OpenAPI source is also namedcafe-api(incafe-menu.arazzo.yaml). As a result,menu-from-cafe-apiwon’t affect request URLs, and both workflows are effectively controlled by thecafe-apioverride.
Either drop the unused override, or (if the intent is to test distinct overrides) rename the nested OpenAPI source in cafe-menu.arazzo.yaml and override that name instead.
resources/cafe-split/paths/orders.yaml:15
$refentries in parameter arrays must not be extended with sibling keys (description,example). As written, these overrides are invalid and may be ignored by OpenAPI tooling.
To keep per-endpoint docs, inline the parameter object(s) here or add dedicated components/parameters variants for orders.
- $ref: ../components/parameters/Filter.yaml
description: |-
Filters the collection items using space-separated `field:value` pairs.
**Filterable fields:** `customerName`, `status`, `totalPrice`, `createdAt`, `id`
cd5d869 to
d15e85c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 81 out of 81 changed files in this pull request and generated no new comments.
Suppressed comments (5)
resources/cafe.yaml:526
- This parameter also combines
$refwith sibling fields (required,description,example). Per the OpenAPI Reference Object rules, those siblings may be ignored or rejected by strict tooling, which is especially risky here becauserequired: truemay not take effect.
Prefer defining an explicit parameter object here (or an endpoint-specific component like OrderItemsFilter) instead of trying to override a $ref inline.
- $ref: '#/components/parameters/Filter'
required: true
description: >-
Selects the order whose items to return, using a single
`orderId:<value>` pair
(for example, `orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7`).
This filter is required and only the `orderId` field is supported.
example: orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7
resources/cafe.yaml:54
- The parameter entry combines a
$refwith sibling fields (description/example). In OpenAPI, a Reference Object must contain only$ref, so these siblings can be ignored by tooling or rejected by validators, and the endpoint-specific docs may not render as intended.
Consider replacing these with dedicated endpoint-specific parameter components (e.g., MenuSort, OrdersSort, etc.) or inlining full Parameter Objects instead of $ref+overrides (this pattern repeats for Filter/Search below and in other paths).
This issue also appears on line 516 of the same file.
- $ref: '#/components/parameters/After'
- $ref: '#/components/parameters/Before'
- $ref: '#/components/parameters/Sort'
description: >-
Sorts the collection by a single field. Prefix with `-` for
descending order
(for example, `-price`); omit the prefix for ascending order
(`price`).
**Sortable fields:** `name`, `price`, `createdAt`, `updatedAt`, `id`
example: '-price'
- $ref: '#/components/parameters/Filter'
resources/cafe-split/paths/menu.yaml:17
- These path-level parameters attempt to override
$ref-d parameter components by adding siblingdescription/examplefields. In OpenAPI, a$refparameter is a Reference Object (must contain only$ref), so the overrides may be ignored or rejected by validators.
To keep endpoint-specific sortable/filterable/searchable field lists, use separate parameter component files (e.g., MenuSort.yaml, MenuFilter.yaml, MenuSearch.yaml) or inline full Parameter Objects here.
- $ref: ../components/parameters/After.yaml
- $ref: ../components/parameters/Before.yaml
- $ref: ../components/parameters/Sort.yaml
description: |-
Sorts the collection by a single field. Prefix with `-` for descending order
(for example, `-price`); omit the prefix for ascending order (`price`).
**Sortable fields:** `name`, `price`, `createdAt`, `updatedAt`, `id`
example: '-price'
resources/cafe-split/paths/orders.yaml:37
- Same issue here:
$ref-d parameter objects are given siblingdescription/examplefields. OpenAPI Reference Objects should not include siblings, so these endpoint-specific docs may not be applied by tooling.
Prefer endpoint-specific parameter components (e.g., OrdersFilter.yaml, OrdersSort.yaml, OrdersSearch.yaml) or inline Parameter Objects without $ref.
- $ref: ../components/parameters/Filter.yaml
description: |-
Filters the collection items using space-separated `field:value` pairs.
**Filterable fields:** `customerName`, `status`, `totalPrice`, `createdAt`, `id`
**Format:** `field1:value1 field2:value2`
**Supported operators:**
- `field:value` - Exact match
- `field:value1,value2` - Match any of the comma-separated values (OR)
- Time ranges (on `createdAt`): Use `30d` (30 days), `7d` (7 days), `1h` (1 hour), etc.
**Examples:**
- `status:placed` - Filter by a single status.
- `status:placed,completed` - Filter by multiple statuses.
- `createdAt:30d` - Orders created in the last 30 days.
- `id:ord_01h1s5z6vf2mm1mz3hevnn9va7` - Filter by a specific order ID.
- `status:placed createdAt:7d` - Combine multiple filters.
example: status:placed
- $ref: ../components/parameters/Sort.yaml
description: |-
Sorts the collection by a single field. Prefix with `-` for descending order
(for example, `-createdAt`); omit the prefix for ascending order (`createdAt`).
**Sortable fields:** `customerName`, `status`, `totalPrice`, `createdAt`, `updatedAt`, `id`
example: '-createdAt'
resources/cafe-split/paths/order-items.yaml:20
- This required filter parameter is expressed as
$refplus sibling fields (required,description,example). With strict OpenAPI reference handling, those siblings can be ignored, meaning the parameter might not be required and the specialized docs might be dropped.
Prefer an explicit Parameter Object here (or an endpoint-specific component parameter) rather than overriding a $ref inline.
- $ref: ../components/parameters/Filter.yaml
required: true
description: |-
Selects the order whose items to return, using a single `orderId:<value>` pair
(for example, `orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7`).
This filter is required and only the `orderId` field is supported.
example: orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7
tatomyr
left a comment
There was a problem hiding this comment.
LGTM. I wonder if we have to update the bundled Cafe description as well?
What/Why/How?
Reference
Testing
Screenshots (optional)
Check yourself
Security
Note
Low Risk
Changes are primarily test fixtures and API documentation; the revenue
date-timeformat update is a contract doc change that clients should verify against the real API.Overview
Respect e2e now targets the live Redocly Cafe API instead of the Museum mock: new
cafe-api.yamlandcafe-api-with-errors.yamlfixtures,cafe-menu.arazzo.yaml, and updated Arazzo workflows/snapshots (menu list/search, OAuth2 register validation,https://api.cafe.redocly.com). The oldmuseum-api-with-errors.yamlfixture is removed.Cafe OpenAPI (
cafe-split,cafe.yaml) gets clearer pagination (before→ previous page), generic sharedfilter/search/limittext with per-endpoint sort/filter/search field lists and examples on menu, orders, and order-items, revenuestartDate/endDateasdate-time(with updated examples), and small description tweaks on orders and schemas.Reviewed by Cursor Bugbot for commit 9a5fd4a. Bugbot is set up for automated code reviews on this repo. Configure here.